// 定义一个装饰器函数
export const finLog = (
  target: any,
  propertyKey: string,
  descriptor: PropertyDescriptor
) => {
  const originalMethod = descriptor.value;
  console.log(target);
  // 修改原方法的行为
  descriptor.value = function (...args: any[]) {
    console.log(`Calling "${propertyKey}" with arguments:`, args);

    const result = originalMethod.apply(this, args);

    console.log(`Finished executing "${propertyKey}", returned:`, result);
    return result;
  };

  return descriptor;
};
